package cn.bonoon.kernel.config;


public abstract class SortableItem implements ISortable {

	protected String id;
	
	protected String name;
	
	protected int ordinal;
	
	public final String getId() {
		return id;
	}

	public final void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	public void setOrdinal(int ordinal) {
		this.ordinal = ordinal;
	}

	public int getOrdinal() {
		return ordinal;
	}

	@Override
	public int compareTo(ISortable o) {
		return ordinal - o.getOrdinal();
	}
}
